package com.shujia.day05;

public class Demo10Circle {
    public static void main(String[] args) {
        new Circle(1).show();
    }
}

class Circle{
    double r ;
    double length;
    double area;

    public Circle(double r) {
        this.r = r;
        length = 2 * Math.PI * r;
        area = Math.PI * r * r;
    }

    public void show(){
        System.out.println("半径："+r);
        System.out.println("周长："+length);
        System.out.println("面积："+area);
    }

}